package com.company.jrlz.service.opcua.config;

import java.util.List;

/**
 * Created by ziye on 2023/9/6
 */
public class OpcUaProperties {

    private String address;

    private Retry retry;  // 重试

    private long publishingRate;

    private List<String> cartonQuantitySubscribeNodes;

    private List<String> otherSubscribeNodes;

    public List<String> getOtherSubscribeNodes() {
        return otherSubscribeNodes;
    }

    public void setOtherSubscribeNodes(List<String> otherSubscribeNodes) {
        this.otherSubscribeNodes = otherSubscribeNodes;
    }

    public List<String> getCartonQuantitySubscribeNodes() {
        return cartonQuantitySubscribeNodes;
    }

    public void setCartonQuantitySubscribeNodes(List<String> cartonQuantitySubscribeNodes) {
        this.cartonQuantitySubscribeNodes = cartonQuantitySubscribeNodes;
    }


    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Retry getRetry() {
        return retry;
    }

    public void setRetry(Retry retry) {
        this.retry = retry;
    }

    public long getPublishingRate() {
        return publishingRate;
    }

    public void setPublishingRate(long publishingRate) {
        this.publishingRate = publishingRate;
    }


    public static class Retry {
        private long connBackOffPeriod = 10000L;
        private int maxAttempts = 3;
        private long backOffPeriod = 1000L;


        public long getConnBackOffPeriod() {
            return connBackOffPeriod;
        }

        public void setConnBackOffPeriod(long connBackOffPeriod) {
            this.connBackOffPeriod = connBackOffPeriod;
        }

        public int getMaxAttempts() {
            return maxAttempts;
        }

        public void setMaxAttempts(int maxAttempts) {
            this.maxAttempts = maxAttempts;
        }

        public long getBackOffPeriod() {
            return backOffPeriod;
        }

        public void setBackOffPeriod(long backOffPeriod) {
            this.backOffPeriod = backOffPeriod;
        }
    }

}
